#include"c3pom/Object.h"
#include"c3pom/dynclass.h"
#include<cstdlib>
#include<cstring>

std::string Object::gettypename()
{
	return _typename;
}

bool Object::istype(std::string name)
{
	return (name==_typename?true:false);
}

Object::Object()
{
	_data=NULL;
}

void Object::operator=(Object& o)//一层深拷贝
{
	this->_typename=o._typename;
	this->_data=o._data;
	this->_size=o._size;
} 

bool Object::isbasictype()
{
	if(istype<int>())
		return true;
	else if(istype<float>())
		return true;
	else if(istype<long>())
		return true;
	else if(istype<char>())
		return true;
	else if(istype<double>())
		return true;
	else if(istype<long long>())
		return true;
	else if(istype<bool>())
		return true;
	else
		return false;

}

bool Object::isnull()
{
	if(_data==NULL)
		return true;
	return false;
}
